mariadb: update to 11.4.7
authorRosen Penev <[email protected]>
Sun, 4 May 2025 01:19:50 +0000 (18:19 -0700)
committerTianling Shen <[email protected]>
Sun, 3 Aug 2025 05:41:51 +0000 (13:41 +0800)
Use upstream solutions to local patches.

Remove test.sh as it's broken.

Signed-off-by: Rosen Penev <[email protected]>
utils/mariadb/Makefile
utils/mariadb/patches/100-fix_hostname.patch [deleted file]
utils/mariadb/patches/110-remove-uring-libaio-checks.patch [deleted file]
utils/mariadb/patches/160-mips-machine.patch [deleted file]
utils/mariadb/patches/190-replace-hostname-in-mysqld_safe.patch [deleted file]
utils/mariadb/patches/200-no-selinux.patch [deleted file]
utils/mariadb/patches/210-no-altivec.patch
utils/mariadb/test.sh [deleted file]

index 4714ba7b354fe63f780f9037b5215e7a613aaa49..0895c37be67a0592fb32140d9ba87ec77751ab7a 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mariadb
-PKG_VERSION:=11.4.4
-PKG_RELEASE:=2
+PKG_VERSION:=11.4.7
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL := https://archive.mariadb.org/$(PKG_NAME)-$(PKG_VERSION)/source
 
-PKG_HASH:=96fbd2e6e93fb7e8b373eea75d85b6fea57c0e111a02090cbbefed52599dc77b
+PKG_HASH:=bf20687ca12fa7efda8df89cab1f2a661288cea41acf8f53189b69d5294347d0
 PKG_MAINTAINER:=Michal Hrusecky <[email protected]>
 PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=COPYING THIRDPARTY
@@ -307,15 +307,6 @@ endef
 # We won't need unit tests
 CMAKE_OPTIONS += -DWITH_UNIT_TESTS=0
 
-# This value is determined automatically during straight compile by compiling
-# and running a test code. You cannot do that during cross-compile. However the
-# stack grows downward in most if not all modern systems. The only exception
-# according to buildroot is PA-RISC which is not supported by OpenWrt as far as
-# I know. Therefore it makes sense to hardcode the value. If an arch is added
-# the stack of which grows up one should expect unpredictable behavior at run
-# time.
-CMAKE_OPTIONS += -DSTACK_DIRECTION=-1
-
 # Make it explicit that we are cross-compiling
 CMAKE_OPTIONS += -DCMAKE_CROSSCOMPILING=1
 
@@ -337,6 +328,7 @@ CMAKE_OPTIONS += -DWITHOUT_SERVER=OFF -DPLUGIN_AUTH_SOCKET=STATIC
 endif
 
 CMAKE_OPTIONS += \
+       -DCMAKE_DISABLE_FIND_PACKAGE_URING=$(if $(CONFIG_KERNEL_IO_URING),OFF,ON) \
        -DCONNECT_WITH_JDBC=NO \
        -DCONNECT_WITH_LIBXML2=system \
        -DCONNECT_WITH_MONGO=NO \
@@ -361,10 +353,11 @@ CMAKE_OPTIONS += \
        -DINSTALL_SQLBENCHDIR="" \
        -DINSTALL_SUPPORTFILESDIR=share/mariadb \
        -DINSTALL_UNIX_ADDRDIR=$(MARIADB_SOCKET) \
+       -DHOSTNAME="uci get system.@system[0].hostname" \
        -DMYSQL_DATADIR=/srv/mysql \
        -DMYSQL_UNIX_ADDR=$(MARIADB_SOCKET) \
+       -DSEMODULE_PACKAGE_EXECUTABLE=NOT-FOUND \
        -DSKIP_TESTS=ON \
-       -DWITH_DEBUG=OFF \
        -DWITH_EMBEDDED_SERVER=OFF \
        -DWITH_INNODB_BZIP2=OFF \
        -DWITH_INNODB_LZ4=OFF \
diff --git a/utils/mariadb/patches/100-fix_hostname.patch b/utils/mariadb/patches/100-fix_hostname.patch
deleted file mode 100644 (file)
index 98547e5..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/scripts/mysql_install_db.sh
-+++ b/scripts/mysql_install_db.sh
-@@ -431,7 +431,7 @@ fi
- # Try to determine the hostname
--hostname=`@HOSTNAME@`
-+hostname=`cat /proc/sys/kernel/hostname`
- # Check if hostname is valid
- if test "$do_resolve" -eq 1
diff --git a/utils/mariadb/patches/110-remove-uring-libaio-checks.patch b/utils/mariadb/patches/110-remove-uring-libaio-checks.patch
deleted file mode 100644 (file)
index 214d92e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/tpool/CMakeLists.txt
-+++ b/tpool/CMakeLists.txt
-@@ -9,7 +9,9 @@ ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Linux
-   ELSEIF(WITH_LIBAIO)
-     SET(LIBAIO_REQUIRED REQUIRED)
-   ENDIF()
--  FIND_PACKAGE(URING QUIET ${URING_REQUIRED})
-+  IF(WITH_URING)
-+    FIND_PACKAGE(URING QUIET ${URING_REQUIRED})
-+  ENDIF()
-   IF(URING_FOUND)
-     SET(URING_FOUND ${URING_FOUND} PARENT_SCOPE)
-     SET(TPOOL_DEFINES "-DHAVE_URING" PARENT_SCOPE)
diff --git a/utils/mariadb/patches/160-mips-machine.patch b/utils/mariadb/patches/160-mips-machine.patch
deleted file mode 100644 (file)
index 06d6dd5..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-From: Debian MySQL Maintainers <[email protected]>
-Date: Thu, 10 Aug 2017 20:40:29 +0200
-Subject: mips-machine
-
----
- cmake/package_name.cmake | 4 ++++
- 1 file changed, 4 insertions(+)
-
---- a/cmake/package_name.cmake
-+++ b/cmake/package_name.cmake
-@@ -34,6 +34,10 @@ IF(NOT VERSION)
-       SET(DEFAULT_MACHINE "mips")
-     ENDIF()
-+    IF(NOT 64BIT AND CMAKE_SYSTEM_PROCESSOR MATCHES "^mips64")
-+      SET(DEFAULT_MACHINE "mips")
-+    ENDIF()
-+
-     IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
-       SET(NEED_DASH_BETWEEN_PLATFORM_AND_MACHINE 0)
-       SET(DEFAULT_PLATFORM "win")
diff --git a/utils/mariadb/patches/190-replace-hostname-in-mysqld_safe.patch b/utils/mariadb/patches/190-replace-hostname-in-mysqld_safe.patch
deleted file mode 100644 (file)
index abb5b46..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/scripts/mysqld_safe.sh
-+++ b/scripts/mysqld_safe.sh
-@@ -253,7 +253,7 @@ wsrep_recover_position() {
-     return 1
-   fi
--  local wr_pidfile="$DATADIR/"`@HOSTNAME@`"-recover.pid"
-+  local wr_pidfile="$DATADIR/"$(uci get 'system.@system[0].hostname')"-recover.pid"
-   local wr_options="--disable-log-error  --pid-file='$wr_pidfile'"
-@@ -675,7 +675,7 @@ then
-         * ) err_log="$DATADIR/$err_log" ;;
-       esac
-     else
--      err_log=$DATADIR/`@HOSTNAME@`.err
-+      err_log=$DATADIR/$(uci get 'system.@system[0].hostname').err
-     fi
-   fi
-@@ -761,7 +761,7 @@ fi
- if test -z "$pid_file"
- then
--  pid_file="`@HOSTNAME@`.pid"
-+  pid_file="$(uci get 'system.@system[0].hostname').pid"
- fi
- # MariaDB wants pid file without datadir
- append_arg_to_args "--pid-file=$pid_file"
diff --git a/utils/mariadb/patches/200-no-selinux.patch b/utils/mariadb/patches/200-no-selinux.patch
deleted file mode 100644 (file)
index ba5bd42..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/support-files/CMakeLists.txt
-+++ b/support-files/CMakeLists.txt
-@@ -79,7 +79,7 @@ IF(UNIX AND NOT WITHOUT_SERVER)
-     INSTALL(FILES magic DESTINATION ${inst_location} COMPONENT SupportFiles)
-     INSTALL(DIRECTORY policy DESTINATION ${inst_location} COMPONENT SupportFiles)
-     FIND_PROGRAM(CHECKMODULE checkmodule)
--    FIND_PROGRAM(SEMODULE_PACKAGE semodule_package)
-+#    FIND_PROGRAM(SEMODULE_PACKAGE semodule_package)
-     MARK_AS_ADVANCED(CHECKMODULE SEMODULE_PACKAGE)
-     # Build pp files in policy/selinux
index a7aab8b3c1238880dd46ba0ebc9391e9311b33c7..3fdc8bd5fe56b5711ed315fe6c7d442482af240b 100644 (file)
@@ -1,21 +1,11 @@
 --- a/mysys/CMakeLists.txt
 +++ b/mysys/CMakeLists.txt
-@@ -138,7 +138,7 @@ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "a
-   ENDIF()
- ENDIF()
--IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64|powerpc64" OR CMAKE_SYSTEM_NAME MATCHES AIX)
-+IF(FALSE)
+@@ -142,7 +142,7 @@ ENDIF()
+ IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64|powerpc64" OR CMAKE_SYSTEM_NAME MATCHES AIX)
    SET(MYSYS_SOURCES ${MYSYS_SOURCES} crc32/crc32_ppc64.c crc32/crc32c_ppc.c)
    SET_SOURCE_FILES_PROPERTIES(crc32/crc32_ppc64.c crc32/crc32c_ppc.c PROPERTIES
-         COMPILE_FLAGS "${COMPILE_FLAGS} -maltivec -mvsx -mpower8-vector -mcrypto -mpower8-vector")
---- a/mysys/crc32ieee.cc
-+++ b/mysys/crc32ieee.cc
-@@ -51,7 +51,6 @@ static my_crc32_t init_crc32()
- static const my_crc32_t my_checksum_func= init_crc32();
- #ifdef __powerpc64__
--# error "my_checksum() is defined in mysys/crc32/crc32_ppc64.c"
- #endif
- extern "C"
- uint32 my_checksum(uint32 crc, const void *data, size_t len)
+-        COMPILE_FLAGS "${COMPILE_FLAGS} -maltivec -mvsx -mpower8-vector -mcrypto -mpower8-vector")
++        COMPILE_FLAGS "${COMPILE_FLAGS} -mvsx -mcrypto")
+   ADD_DEFINITIONS(-DHAVE_POWER8 -DHAS_ALTIVEC)
+ ELSE()
+   SET (MYSYS_SOURCES ${MYSYS_SOURCES} crc32ieee.cc)
diff --git a/utils/mariadb/test.sh b/utils/mariadb/test.sh
deleted file mode 100755 (executable)
index cb33bba..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-# shellcheck disable=SC1090
-. "$CI_HELPER"
-
-check_version() {
-       bin="$1"
-       ver="$2"
-       com="$3"
-
-       if [ -x "$bin" ]; then
-               if "$bin" --version | grep " $ver-MariaDB"; then
-                       success "MariaDB $com is in version $2"
-               else
-                       err_die "MariaDB $com seems to be in wrong version"
-               fi
-       else
-               err_die "Can't find $com server binary"
-       fi
-}
-
-case "$PKG_NAME" in
-       mariadb-server) check_version /usr/bin/mysqld "$PKG_VERSION" "server" ;;
-       mariadb-client) check_version /usr/bin/mysql "$PKG_VERSION" "client";;
-       *) info "Skipping $PKG_NAME" ;;
-esac